#/usr/bin/python
#coding:utf-8
__author__ = 'shine_forever'


from socket import *


HOST='172.16.41.198'
PORT=50007
BUFSIZ=1024
ADDR=(HOST,PORT)


s=socket(AF_INET,SOCK_STREAM)

s.connect(ADDR)


while True:
    data = raw_input('please input your text: ')
    if not data:
        break
    s.sendall(data)
    data=s.recv(BUFSIZ)
    if not data:
        break
    print data

s.close()